package com.gitee.wsl.compose.ui.toast

/**
 * @Description:
 * @Author: JIULANG
 * @Data: 2023/7/5 1:02
 */

open class ToastModel(
    open val message: String,
    val type: Type = Type.Normal,
    open val durationTime: Long? = null,
) {
    enum class Type {
        Normal, Success, Info, Warning, Error,
    }

    companion object{
        fun Success(message: String) =  ToastModel(message, Type.Success, null)

        fun Info(message: String) =  ToastModel(message, Type.Info, null)

        fun Error(message: String) = ToastModel(message, Type.Error, null)

        fun Warning(message: String) =ToastModel(message, Type.Warning, null)
    }
}

